<template>
  <quick-layout
    ref="Instance"
    :is-operate-btn="true"
    :is-operate="true"
    :data-list-url="dataListUrl"
    :delete-url="deleteUrl"
    :export-url="exportUrl"
    :import-url="importUrl"
    table-title="环保手续申请"
    size="small"
    @edit="handleEdit"
    @created="handleEdit(null)"
  >
    <template v-slot:query="{query,reset}">
      <query-item label="模糊查询">
        <el-input v-model="query.keyword" style="width: 270px" placeholder="请输入关键词..." />
      </query-item>
      <query-item label="ID" prop="id">
        <el-input v-model="query.id" placeholder="ID" />
      </query-item>
      <query-item label="业务主键" prop="businessKey">
        <el-input v-model="query.businessKey" placeholder="业务主键" />
      </query-item>
      <query-item label="附件ID" prop="attachId">
        <el-input v-model="query.attachId" placeholder="附件ID" />
      </query-item>
      <query-item label="机组" prop="unit">
        <el-input v-model="query.unit" placeholder="机组" />
      </query-item>
      <query-item label="项目名称" prop="projectName">
        <el-input v-model="query.projectName" placeholder="项目名称" />
      </query-item>
      <query-item label="环保手续分类" prop="evnFormalitiesCategory">
        <el-input v-model="query.evnFormalitiesCategory" placeholder="环保手续分类" />
      </query-item>
      <query-item label="批文名称" prop="approvalDocumentName">
        <el-input v-model="query.approvalDocumentName" placeholder="批文名称" />
      </query-item>
      <query-item label="承诺项" prop="promiseItem">
        <el-input v-model="query.promiseItem" placeholder="承诺项" />
      </query-item>
      <query-item label="责任部门" prop="responsibleDepartment">
        <el-input v-model="query.responsibleDepartment" placeholder="责任部门" />
      </query-item>
      <query-item label="责任人员工号" prop="responsiblePersonalName">
        <el-input v-model="query.responsiblePersonalName" placeholder="责任人员工号" />
      </query-item>
      <query-item label="责任人员姓名" prop="responsiblePersonalCode">
        <el-input v-model="query.responsiblePersonalCode" placeholder="责任人员姓名" />
      </query-item>
      <query-item label="执行频率" prop="executionFrequency">
        <el-input v-model="query.executionFrequency" placeholder="执行频率" />
      </query-item>
      <query-item label="完成期限" prop="completionDeadline">
        <el-input v-model="query.completionDeadline" placeholder="完成期限" />
      </query-item>
      <query-item label="备注" prop="remark">
        <el-input v-model="query.remark" placeholder="备注" />
      </query-item>
      <query-item label="流程状态" prop="processStatus">
        <el-input v-model="query.processStatus" placeholder="流程状态" />
      </query-item>
      <query-item label="关闭日期" prop="closeDate">
        <el-input v-model="query.closeDate" placeholder="关闭日期" />
      </query-item>
      <query-item label="创建人工号" prop="createdUserCode">
        <el-input v-model="query.createdUserCode" placeholder="创建人工号" />
      </query-item>
      <query-item label="创建人姓名" prop="createdUserName">
        <el-input v-model="query.createdUserName" placeholder="创建人姓名" />
      </query-item>
      <query-item label="创建时间" prop="createdTime">
        <el-input v-model="query.createdTime" placeholder="创建时间" />
      </query-item>
      <query-item label="修改人工号" prop="updatedUserCode">
        <el-input v-model="query.updatedUserCode" placeholder="修改人工号" />
      </query-item>
      <query-item label="修改人姓名" prop="updatedUserName">
        <el-input v-model="query.updatedUserName" placeholder="修改人姓名" />
      </query-item>
      <query-item label="修改时间" prop="updatedTime">
        <el-input v-model="query.updatedTime" placeholder="修改时间" />
      </query-item>
      <query-item label="删除标志" prop="delFlag">
        <el-input v-model="query.delFlag" placeholder="删除标志" />
      </query-item>
    </template>
    <template>
      <el-table-column type="selection" header-align="center" align="center" width="50" />
      <el-table-column prop="id" label="ID" header-align="center" align="center" />
      <el-table-column prop="businessKey" label="业务主键" header-align="center" align="center" />
      <el-table-column prop="attachId" label="附件ID" header-align="center" align="center" />
      <el-table-column prop="unit" label="机组" header-align="center" align="center" />
      <el-table-column prop="projectName" label="项目名称" header-align="center" align="center" />
      <el-table-column prop="evnFormalitiesCategory" label="环保手续分类" header-align="center" align="center" />
      <el-table-column prop="approvalDocumentName" label="批文名称" header-align="center" align="center" />
      <el-table-column prop="promiseItem" label="承诺项" header-align="center" align="center" />
      <el-table-column prop="responsibleDepartment" label="责任部门" header-align="center" align="center" />
      <el-table-column prop="responsiblePersonalName" label="责任人员工号" header-align="center" align="center" />
      <el-table-column prop="responsiblePersonalCode" label="责任人员姓名" header-align="center" align="center" />
      <el-table-column prop="executionFrequency" label="执行频率" header-align="center" align="center" />
      <el-table-column prop="completionDeadline" label="完成期限" header-align="center" align="center" />
      <el-table-column prop="remark" label="备注" header-align="center" align="center" />
      <el-table-column prop="processStatus" label="流程状态" header-align="center" align="center" />
      <el-table-column prop="closeDate" label="关闭日期" header-align="center" align="center" />
      <el-table-column prop="createdUserCode" label="创建人工号" header-align="center" align="center" />
      <el-table-column prop="createdUserName" label="创建人姓名" header-align="center" align="center" />
      <el-table-column prop="createdTime" label="创建时间" header-align="center" align="center" />
      <el-table-column prop="updatedUserCode" label="修改人工号" header-align="center" align="center" />
      <el-table-column prop="updatedUserName" label="修改人姓名" header-align="center" align="center" />
      <el-table-column prop="updatedTime" label="修改时间" header-align="center" align="center" />
      <el-table-column prop="delFlag" label="删除标志" header-align="center" align="center" />
    </template>
    <template #component>
      <add-or-update ref="addOrUpdateRef" @refreshDataList="getDataList" />
    </template>
  </quick-layout>
</template>

<script>
import AddOrUpdate from './add-or-update.vue'
import QuickLayout from '@/components/EmpsLayout/index.vue'
import QueryItem from '@/components/QueryItem/index.vue'

export default {
  name: 'EnvironmentalProtectionProcedures',
  components: { QuickLayout, QueryItem, AddOrUpdate },
  data() {
    return {
      dataListUrl: '/business/environmental_protection_procedures/page',
      deleteUrl: '/business/environmental_protection_procedures',
      exportUrl: '/business/environmental_protection_procedures/export',
      importUrl: '/business/environmental_protection_procedures/import',
      businessEnum: []
    }
  },
  created() {
    this.getBusinessEnum()
  },
  methods: {
    getInstance() {
      return this.$ref.Instance
    },
    handleEdit(id) {
      this.$refs.addOrUpdateRef.init(id)
    },
    getDataList() {
      this.getInstance().query()
    }
  }
}
</script>
